export default function split<T> (srcArr: Array<T>, rowLen: number) {
  let arr: Array<Array<T>> = [];
  srcArr.map((item, index) => {
    const rowIndex = Math.floor(index / rowLen);
    if (!arr[rowIndex]) {
      arr.push([item]);
    } else {
      arr[rowIndex].push(item);
    }
  });
  return arr;
}
